﻿#!/usr/bin/env python3

from fileinput import input, hook_encoded

def main():
    '''
os.path -  对文件路径的各种操作
    '''
    print(main.__doc__)
    print("="*30)

    fi = input(files="a22_fileinput.py", openhook=hook_encoded('utf-8'))
    for line in fi:
        print("{0:>2}: {1}".format(fi.lineno(), line), end='')

if __name__=='__main__':
    main()